package BuilderDemo.example;

/**
 * @author zsh
 * @Description
 * @create 2022-05-30 19:41
 */
public class Director {
    private Builder builder;

    public Director(Builder builder){  //接收的是子类
        this.builder = builder;
    }

    public void construct(){  //编辑文档
        builder.makeTitle("Greeting");
        builder.makeString("上午至下午");
        builder.makeItems(new String[]{
                "早上好",
                "下午好",
        });

        builder.makeString("晚上");
        builder.makeItems(new String[]{
                "晚上好",
                "再见",
        });
        builder.close();
    }

}
